<template>
  <uni-nav-bar
    v-if="isWechat()"
    :border="false"
    left-icon="left"
    fixed
    status-bar
    @click-left="router.back"
  />
  <view class="web-contain">
    <web-view :src="link"></web-view>
  </view>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import { useRouter } from '../../router';
import { isWechat } from '@/utils/platform';

const router = useRouter();
const link = ref('');

onLoad(async (options) => {
  link.value = decodeURIComponent(options!.url);
});
</script>

<style scoped lang="scss">
.web-contain {
  width: 100%;
  min-height: 100vh;
  background: #fff;
}
</style>
